import request from '@/utils/http'
import { BaseResult } from '@/types/axios'

export class DeptService {
  // 获取部门列表
  static getDeptList(params?: object) {
    return request.get<BaseResult>({
      url: '/user/dept/list',
      params
    })
  }
  // 新增部门
  static deptUpdate(params: object) {
    return request.post<BaseResult>({
      url: '/user/dept/update',
      data: params
    })
  }
  // 更新部门
  static deptCreate(params: object) {
    return request.post<BaseResult>({
      url: '/user/dept/create',
      data: params
    })
  }
  // 删除部门
  static deptDelete(params: object) {
    return request.post<BaseResult>({
      url: '/user/dept/delete',
      data: params
    })
  }
}